package city.spring.modules.material.vo;

import city.spring.modules.material.entity.MaterialdeliveryEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 实体类：物资出库
 *
 * @author 谢金婷
 * @date 2020-07-02 13:41:43
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class MaterialdeliveryVO extends MaterialdeliveryEntity {

    /**
     * 该物资出库关联的物资列表信息
     */
    private List<MaterialdeliveryMaterialVO> materials;

    public MaterialdeliveryVO(MaterialdeliveryEntity entity) {
        super.setId(entity.getId());
        super.setMaterialreceiptId(entity.getMaterialreceiptId());
        super.setReceiptername(entity.getReceiptername());
        super.setDestination(entity.getDestination());
        super.setDeliverydate(entity.getDeliverydate());
        super.setUserId(entity.getUserId());
        super.setName(entity.getName());
        super.setDeliverydepartmentId(entity.getDeliverydepartmentId());
        super.setDepartmentName(entity.getDepartmentName());
        super.setUsersId(entity.getUsersId());
        super.setUsername(entity.getUsername());
        super.setGmtCreate(entity.getGmtCreate());
        super.setGmtModified(entity.getGmtModified());
    }

    @Override
    public String toString() {
        return super.toString();
    }

}